/**
* 工具类方法
* create by zhangguangde
*/

// api对象
import { home, api} from './../config/api.js';
// 公用方法
import { getClientId } from './../common/common.js';
// 浏览器相关
import browser from './browser.js';
// cookie 增删改查方法
import cookie from './cookie.js';
// localStorage
import localStorage from './localStorage.js';

/**
* 获取api
*/
function getApi(key) {
	return home + api[key];
}

/**
* path变换
* 获取clintId，并替换返回
*/
function getPath(path) {
	path = path.replace(':clientId', getClientId())
	return path;
}

export {
	getApi,
	getPath,
	cookie,
	browser,
	localStorage
};
